.head แบบทดสอบ
%style
  th {border-bottom:solid #6C99C6 2px;padding-bottom:10px;color:#2175BC}
  td 
%p โปรดเลือกแบบทดสอบ
%table{:style=>'clear:left;width:100%;margin-top:0px;', :cellspacing=>0}
  - @courses.each do |course|
    - next if course.exams.count==0
    %tr
      %td{:colspan=>'4'}
        %h3{:style=>"padding-top:20px; margin-bottom:0;color:#1958B7;"}= course.name
    %tr
      %th แบบทดสอบ
      %th{:style=>'width:50%;'} คำอธิบาย
      %th ประเภท
      %th{:style=>'width:5em;'} จำนวนข้อ
    - course.exam_schedules.each do |schedule|
      -if schedule.exam
        - next if schedule.exam.exam_questions.count==0
        - next if schedule.start.blank? || schedule.end.blank?
        - next if schedule.start > Time.now || schedule.end < Time.now
        %tr{:style=>"background-color:#{cycle('#ddd','#fff')};"}
          %td{:valign=>'top'}
            = image_tag "arrow_right.png"
            = link_to schedule.exam.name, {:action=>:start, :id=>schedule.exam, :schedule_id=>schedule.id}, :style=>"position:relative; top:-5px;"
          %td= schedule.exam.description
          %td{:style=>'font-size:8pt;'}= qtype_name schedule.exam
          %td{:style=>'text-align:right'}= schedule.total_question
